perm filename OPS5[W86,JMC] blob sn#807051 filedate 1986-01-06 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	ops5[w86,jmc]		Ideas suggested by the OPS5 book
C00006 ENDMK
C⊗;
ops5[w86,jmc]		Ideas suggested by the OPS5 book

Programming expert systems in OPS5 - An introduction to rule-based
programming - Lee Brownston, Robert Farrell, Elaine Kant, Nancy Martin

1986 Jan 5

1. A programming language involving assertions is inadequate if
in order to understand the result of a program, one has to understand
the sequence of events.  The whole reason for a logical assertion
based language is to obtain the consequences of a set of assertions
without specifying the detailed sequence of events.  This criticism
probably applies to all the current logic-based or rule-based
languages.  It certainly applies to OPS5 and often to Prolog.

2. We can do Fortran in OPS5 by introducing a program counter
and a statement  (pc ↑pc pcvalue).  Rules corresponding to
Fortran statements then have pc numbers.  A rule with pc number  n
then has the statement  (pc ↑pc n)  among its preconditions.  If the
statement doesn't involve a  go to  it will have 
 (modify pc ↑pc n+1) among its post conditions.  The point of this
remark isn't to advocate imitating Fortran in OPS5 or similar systems,
but some sequential computation is occasionally required.

	However, notice that certain generalizations of sequential
computation are equally easy.

	a. We can have several pcs, perhaps with statements of the
form

(pc ↑pc1 pc1value ↑pc2 pc2value ...).

This means that several sequential computations can run in parallel.
However, unadulterated recency, MEA I guess, would cause maximal
unfairness.

	b. Sequential computations can be mixed with others.

	c. Sequences can stop by setting their pcs to values not
mentioned in rules.

	d. Sequences can be interrupted by other rules including
other sequences by setting their pcs to certain values.

3. In Elephant it was necessary to distinguish between the  pc, which
was just another function of time and time itself.  It looks like the
same kind of distinction between situations and pc-type fluents may
help realize control with mental situations.